org.eclipse.vtp.framework.common.configurations
Class BranchConfiguration

java.lang.Object
  extended by org.eclipse.vtp.framework.common.configurations.BranchConfiguration
All Implemented Interfaces:
CommonConstants, IConfiguration

public class BranchConfiguration
extends java.lang.Object
implements IConfiguration, CommonConstants

A configuration for a variable assignment.

Author:
Lonnie Pryor

Field Summary
static int COMPARISON_TYPE_EQUAL
          The == comparison type.
static int COMPARISON_TYPE_GREATER_THAN
          The > comparison type.
static int COMPARISON_TYPE_GREATER_THAN_OR_EQUAL
          The >= comparison type.
static int COMPARISON_TYPE_LESS_THAN
          The < comparison type.
static int COMPARISON_TYPE_LESS_THAN_OR_EQUAL
          The <= comparison type.
static int COMPARISON_TYPE_NOT_EQUAL
          The != comparison type.
static int OPERAND_TYPE_EXPRESSION
          The expression operand type.
static int OPERAND_TYPE_VARIABLE
          The variable operand type.
 
Fields inherited from interface org.eclipse.vtp.framework.common.configurations.CommonConstants
MAPPING_TYPE_EXPRESSION, MAPPING_TYPE_NONE, MAPPING_TYPE_STATIC, MAPPING_TYPE_VARIABLE, NAME_ASSIGNMENT, NAME_BRANCH, NAME_BRAND, NAME_DATA_TYPE, NAME_DISPATCH, NAME_ENTRY, NAME_EXIT, NAME_FIELD, NAME_INITIAL_VALUE, NAME_KEY, NAME_LEFT_OPERAND, NAME_NAME, NAME_OUTGOING, NAME_PATH, NAME_PRIMARY_FIELD, NAME_RIGHT_OPERAND, NAME_SCRIPT, NAME_SCRIPTING_LANGUGAGE, NAME_TYPE, NAME_URI, NAME_VALUE, NAME_VARIABLE_MAPPING, NAMESPACE_URI
 
Constructor Summary
BranchConfiguration()
          Creates a new AssignmentConfiguration.
 
Method Summary
 java.lang.String getLeftScriptingLanguage()
          Returns the scripting language to use for the left-hand side of the operation.
 int getLeftType()
          Returns the type of the left-hand operand.
 java.lang.String getLeftValue()
          Returns the value to use for the left-hand side of the operation.
 java.lang.String getPath()
          Returns the path to follow if the comparison is true.
 java.lang.String getRightScriptingLanguage()
          Returns the rightScriptingLanguage.
 int getRightType()
          Returns the type of the right-hand operand.
 java.lang.String getRightValue()
          Returns the value to use for the right-hand side of the operation.
 int getType()
          Returns the type of comparison to make.
 void load(org.w3c.dom.Element configurationElement)
          Loads the configuration information from the specified XML element.
 void save(org.w3c.dom.Element configurationElement)
          Saves the configuration information into the supplied XML element.
 void setLeftExpressionValue(java.lang.String leftValue, java.lang.String leftScriptingLanguage)
          Sets the value to use for the left-hand side of the operation.
 void setLeftVariableValue(java.lang.String leftValue)
          Sets the value to use for the left-hand side of the operation.
 void setPath(java.lang.String path)
          Sets the path to follow if the comparison is true.
 void setRightExpressionValue(java.lang.String rightValue, java.lang.String rightScriptingLanguage)
          Sets the value to use for the right-hand side of the operation.
 void setRightVariableValue(java.lang.String rightValue)
          Sets the value to use for the right-hand side of the operation.
 void setType(int type)
          Sets the type of comparison to make.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPARISON_TYPE_EQUAL

public static final int COMPARISON_TYPE_EQUAL
The == comparison type.

See Also:
Constant Field Values

COMPARISON_TYPE_LESS_THAN

public static final int COMPARISON_TYPE_LESS_THAN
The < comparison type.

See Also:
Constant Field Values

COMPARISON_TYPE_LESS_THAN_OR_EQUAL

public static final int COMPARISON_TYPE_LESS_THAN_OR_EQUAL
The <= comparison type.

See Also:
Constant Field Values

COMPARISON_TYPE_GREATER_THAN

public static final int COMPARISON_TYPE_GREATER_THAN
The > comparison type.

See Also:
Constant Field Values

COMPARISON_TYPE_GREATER_THAN_OR_EQUAL

public static final int COMPARISON_TYPE_GREATER_THAN_OR_EQUAL
The >= comparison type.

See Also:
Constant Field Values

COMPARISON_TYPE_NOT_EQUAL

public static final int COMPARISON_TYPE_NOT_EQUAL
The != comparison type.

See Also:
Constant Field Values

OPERAND_TYPE_VARIABLE

public static final int OPERAND_TYPE_VARIABLE
The variable operand type.

See Also:
Constant Field Values

OPERAND_TYPE_EXPRESSION

public static final int OPERAND_TYPE_EXPRESSION
The expression operand type.

See Also:
Constant Field Values
Constructor Detail

BranchConfiguration

public BranchConfiguration()
Creates a new AssignmentConfiguration.

Method Detail

getType

public int getType()
Returns the type of comparison to make.

Returns:
The type of comparison to make.

setType

public void setType(int type)
Sets the type of comparison to make.

Parameters:
type - The type of comparison to make.

getPath

public java.lang.String getPath()
Returns the path to follow if the comparison is true.

Returns:
The path to follow if the comparison is true.

setPath

public void setPath(java.lang.String path)
Sets the path to follow if the comparison is true.

Parameters:
path - The path to follow if the comparison is true.

getLeftType

public int getLeftType()
Returns the type of the left-hand operand.

Returns:
The type of the left-hand operand.

getLeftValue

public java.lang.String getLeftValue()
Returns the value to use for the left-hand side of the operation.

Returns:
The value to use for the left-hand side of the operation.

getLeftScriptingLanguage

public java.lang.String getLeftScriptingLanguage()
Returns the scripting language to use for the left-hand side of the operation.

Returns:
The scripting language to use for the left-hand side of the operation.

setLeftVariableValue

public void setLeftVariableValue(java.lang.String leftValue)
Sets the value to use for the left-hand side of the operation.

Parameters:
leftValue - The name of the variable to use for the left-hand side of the operation.

setLeftExpressionValue

public void setLeftExpressionValue(java.lang.String leftValue,
                                   java.lang.String leftScriptingLanguage)
Sets the value to use for the left-hand side of the operation.

Parameters:
leftValue - The expression to use for the left-hand side of the operation.
leftScriptingLanguage - The scripting language to use for the left-hand side of the operation.

getRightType

public int getRightType()
Returns the type of the right-hand operand.

Returns:
The type of the right-hand operand.

getRightValue

public java.lang.String getRightValue()
Returns the value to use for the right-hand side of the operation.

Returns:
The value to use for the right-hand side of the operation.

getRightScriptingLanguage

public java.lang.String getRightScriptingLanguage()
Returns the rightScriptingLanguage.

Returns:
The rightScriptingLanguage.

setRightVariableValue

public void setRightVariableValue(java.lang.String rightValue)
Sets the value to use for the right-hand side of the operation.

Parameters:
rightValue - The name of the variable to use for the right-hand side of the operation.

setRightExpressionValue

public void setRightExpressionValue(java.lang.String rightValue,
                                    java.lang.String rightScriptingLanguage)
Sets the value to use for the right-hand side of the operation.

Parameters:
rightValue - The expression to use for the right-hand side of the operation.
rightScriptingLanguage - The scripting language to use for the right-hand side of the operation.

load

public void load(org.w3c.dom.Element configurationElement)
Description copied from interface: IConfiguration
Loads the configuration information from the specified XML element.

Specified by:
load in interface IConfiguration
Parameters:
configurationElement - The element to load the configuration from.

save

public void save(org.w3c.dom.Element configurationElement)
Description copied from interface: IConfiguration
Saves the configuration information into the supplied XML element.

Specified by:
save in interface IConfiguration
Parameters:
configurationElement - The element to save the configuration to.